Skip to content

Conversation

bleepbloopsify
Copy link
Member

@bleepbloopsify bleepbloopsify commented Sep 30, 2025

This bundle has been moved around a lot:
https://github.com/o1-labs/o1js-bindings
->
https://github.com/o1-labs/o1js
->
here

It belongs here because we need the features and the build breakage to stay inside the same scope.
When you make a PR to mina, its not immediately obvious that you need to stay within "JS" features. This way we guarantee that breaking OCaml changes also break o1js_bindings here.

Explain your changes:

  • copied o1js_bindings from o1js into mina/src/lib/o1js_bindings
  • Added a promotion target so it generates the JS files and spits them out locally

Explain how you tested your changes:

  • I ran dune build and it built the required artifacts for o1js to build and unit test appropriately.

Checklist:

  • Dependency versions are unchanged
    • Notify Velocity team if dependencies must change in CI
  • Modified the current draft of release notes with details on what is completed or incomplete within this project
  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? List them
  • Closes #0000

@bleepbloopsify bleepbloopsify requested a review from a team as a code owner September 30, 2025 13:50
@bleepbloopsify
Copy link
Member Author

!ci-build-me

@bleepbloopsify bleepbloopsify marked this pull request as draft September 30, 2025 13:56
@bleepbloopsify bleepbloopsify force-pushed the leon/o1js-bindings branch 2 times, most recently from 08ca821 to db75cb6 Compare September 30, 2025 14:45
@bleepbloopsify
Copy link
Member Author

bleepbloopsify commented Sep 30, 2025

o1js [leon/bump-mina] ♞  git rev-parse HEAD
ecd9f4145a3da56d857a799793ad057d2fe46683
o1js [leon/bump-mina] ♞  git rev-parse HEAD
ecd9f4145a3da56d857a799793ad057d2fe46683
o1js [leon/bump-mina] ♞  diff -r ./src/bindings/ocaml/ ../mina/src/lib/o1js_bindings
Only in ./src/bindings/ocaml: .ocamlformat
Only in ../mina/src/lib/o1js_bindings: artifacts
diff --color -r ./src/bindings/ocaml/dune ../mina/src/lib/o1js_bindings/dune
2d1
<  (flags :standard -w +a)
23d21
<  (flags :standard -w +a)
Only in ./src/bindings/ocaml: dune-project
diff --color -r ./src/bindings/ocaml/jsoo_exports/dune ../mina/src/lib/o1js_bindings/jsoo_exports/dune
11,13c11,15
<   (:d1 ../../../mina/src/lib/crypto/kimchi_bindings/js/node_js/plonk_wasm.js)
<   (:d2
<    ../../../mina/src/lib/crypto/kimchi_bindings/js/node_js/plonk_wasm_bg.wasm))
---
>   (:d1 ../../crypto/kimchi_bindings/js/node_js/plonk_wasm.js)
>   (:d2 ../../crypto/kimchi_bindings/js/node_js/plonk_wasm_bg.wasm))
>  (mode
>   (promote
>    (into ../artifacts)))
24,26c26,30
<   (:d1 ../../../mina/src/lib/crypto/kimchi_bindings/js/web/plonk_wasm.js)
<   (:d2
<    ../../../mina/src/lib/crypto/kimchi_bindings/js/web/plonk_wasm_bg.wasm))
---
>   (:d1 ../../crypto/kimchi_bindings/js/web/plonk_wasm.js)
>   (:d2 ../../crypto/kimchi_bindings/js/web/plonk_wasm_bg.wasm))
>  (mode
>   (promote
>    (into ../artifacts)))
35a40,42
>  (mode
>   (promote
>    (into ../artifacts)))
50a58,60
>  (mode
>   (promote
>    (into ../artifacts)))
65a76,77
>  (promote
>   (into ../artifacts))
82a95,96
>  (promote
>   (into ../artifacts))
diff --color -r ./src/bindings/ocaml/lib/consistency_test.ml ../mina/src/lib/o1js_bindings/lib/consistency_test.ml
292c292
<       command |> hash_signed_command |> to_base58_check |> Js.string )
---
>       command |> hash_signed_command |> to_base58_check |> Js.string)
300c300
<       command |> hash_zkapp_command |> to_base58_check |> Js.string )
---
>       command |> hash_zkapp_command |> to_base58_check |> Js.string)
diff --color -r ./src/bindings/ocaml/lib/local_ledger.ml ../mina/src/lib/o1js_bindings/lib/local_ledger.ml
240,241c240
<     Transaction_logic.apply_zkapp_command_unchecked
<       ~signature_kind
---
>     Transaction_logic.apply_zkapp_command_unchecked ~signature_kind

@bleepbloopsify
Copy link
Member Author

!ci-build-me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant